package net.lzzy.practices.web.models;
;
import lombok.Getter;
import net.lzzy.practices.entities.Applicant;

import java.util.Date;
import java.util.UUID;

@Getter
public class VmApplicant {
    private UUID id;
    private int status;
    private Date applyTime;
    private UUID courseId;
    private String Name;
    private String desc;
    private String cover;
    private Date createTime;
    private Date updateTime;
    private String teacherName;
    private String teacherAvatar;
    private String studentName;
    private String studentAvatar;

    public VmApplicant(Applicant applicant){
        id = applicant.getId();
        status = applicant.getStatus();
        applyTime = applicant.getApplyTime();
        courseId = applicant.getId();
        Name = applicant.getCourse().getName();
        desc = applicant.getCourse().getDescription();
        cover = applicant.getCourse().getCover();
        createTime = applicant.getCourse().getCreateTime();
        updateTime = applicant.getCourse().getUpdateTime();
        teacherName = applicant.getCourse().getTeacher().getNickName();
        teacherAvatar = applicant.getCourse().getTeacher().getAvatar();
        studentName = applicant.getStudent().getNickName();
        studentAvatar = applicant.getStudent().getAvatar();
    }
}
